During the last 2 years, COVID-19 has been a main focus of the news. Though around 3% of the world population had COVID-19, diabetes can be considered as an even bigger health problem. Indeed, according to the International Diabetes Foundations (IDF), in 2019, 463 million adults were living with diabetes (around 6-7% of the world population) and this number is forecasted to rise to 700 million by 2050. Furthermore, 90% of cases of diabetes are of type 2, which means it results mainly from bad habits and not genetics. However both types of diabetes can be treated and/or prevented with a healthier diet and more physical activity. Additionally, according to the WHO, low income countries are more susceptible to having higher diabetes prevalence. Living in Europe, we observed that diabetes rates differ a lot from one country to another, so we wanted to find out if these rates were indeed linked to a country’s income, and if the nutritious composition of richer states’ population’s diet is also affected by this income difference and if yes, how it is affected.
Therefore, we would like to find out answers to the following questions :
Do European countries that have higher GDPs really have lower diabetes prevalence ?
Do European countries that have higher GDPs consume less calories ?
How do the proportions of macronutrients (animal protein/plant protein/fat/carbohydrates) consumed differ between richer and poorer governments ?
And how do these differences relate to the diabetes prevalence in these countries ?
What is the typical diet that can be observed in richer states that relates to lower diabetes prevalence ?
To answer our research questions, we used three different datasets. While searching for datasets, we made sure that the years and countries matched for every one of them.
The first dataset we used, downloaded from the portal https://ourworldindata.org/diet-compositions, contains information related to the supply of macronutrients in calories for different countries. We used data related to food supply rather than food consumption, as the latter is harder to find and generally, supply reflects the population’s demand and therefore its food consumption. The dataset gives us information on the average nutrition of different countries from 1961 to 2013 :
It is composed of 8981 observations of 7 variables:
Entity Name of the countryCode ISO country codeYearYear of the observationCalories from animal protein (FAO (2017)) The average per capita supply of calories derived from animal protein all measured in kilocalories per person per dayCalories from plant protein (FAO (2017)) The average per capita supply of calories derived from plant protein, all measured in kilocalories per person per dayCalories from fat (FAO (2017))The average per capita supply of calories derived from fat, all measured in kilocalories per person per dayCalories from carbohydrates (FAO (2017)) The average per capita supply of calories derived from carbohydrates, all measured in kilocalories per person per dayThe intake of specific macronutrients (carbohydrates, protein and fats) are derived based on average food composition factors – these factors are derived and presented in the Food and Agriculture Organisation’s (FAO) Food Balance Sheet Handbook (https://www.fao.org/faostat/en/#data).
We will only focus on observations of European countries in the 2000s.
We used the ISO code as it is standardized worldwide and does not have the risk of having different names in different tables like the countries’ names.
Then, we proceeded to compute the mean of the consumption for each type of macronutrient in each country between the years 2000 and 2013, and the sum of total calories per person per day for each country in order to answer our second research question.
We then created a new table by adding the sum of total calories per person per day for each country in order to get a broader view with the total consumption of calories. To make sure that the joining of tables go smoothly, we also removed duplicates and the country name column.
Our assumption was that a county’s wealth may fluctuate over the course of 10 years (ex: a dip during the economic crisis of 2008) but an overall mean is sufficient to compare the different countries and their riches.
We now have a dataframe with the following variables :
country_code ISO country codecal_prot_animalThe mean of the calories from animal protein consumed in each country in the years 2000-2013cal_prot_plant The mean of the calories from plant protein consumed in each country in the years 2000-2013cal_carbsThe mean of the calories from carbohydrates consumed in each country in the years 2000-2013cal_fat The mean of the calories from fat consumed in each country in the years 2000-2013total_consumption The total consumption based on the means of the consumption of each type of macronutrients in each countries in the years 2000-2013| Country Code | Calories from animal protein | Calories from plant protein | Calories from carbohydrates | Calories from fat | Total consumption |
|---|---|---|---|---|---|
| AUT | 245 | 169 | 1833 | 1454 | 3702 |
| BEL | 238 | 158 | 1856 | 1467 | 3719 |
| BGR | 155 | 168 | 1606 | 846 | 2775 |
| HRV | 168 | 148 | 1691 | 940 | 2946 |
| CYP | 197 | 127 | 1291 | 1019 | 2633 |
| CZE | 218 | 153 | 1728 | 1155 | 3254 |
| DNK | 273 | 157 | 1746 | 1190 | 3366 |
| EST | 212 | 167 | 1967 | 842 | 3188 |
| FIN | 269 | 166 | 1623 | 1177 | 3234 |
| FRA | 293 | 161 | 1611 | 1480 | 3545 |
| DEU | 240 | 159 | 1785 | 1276 | 3460 |
| GRC | 250 | 204 | 1744 | 1338 | 3536 |
| HUN | 193 | 153 | 1560 | 1221 | 3126 |
| IRL | 279 | 174 | 1950 | 1187 | 3590 |
| ITA | 241 | 204 | 1776 | 1390 | 3612 |
| LVA | 203 | 154 | 1687 | 1044 | 3087 |
| LTU | 274 | 198 | 2055 | 858 | 3385 |
| LUX | 288 | 148 | 1752 | 1318 | 3507 |
| MLT | 237 | 204 | 1932 | 994 | 3367 |
| NLD | 292 | 136 | 1599 | 1195 | 3222 |
| POL | 204 | 197 | 1969 | 1035 | 3405 |
| PRT | 275 | 177 | 1824 | 1240 | 3516 |
| ROU | 200 | 220 | 2003 | 916 | 3340 |
| SVK | 140 | 150 | 1610 | 952 | 2853 |
| SVN | 230 | 168 | 1664 | 1067 | 3129 |
| ESP | 279 | 159 | 1481 | 1323 | 3243 |
| SWE | 285 | 143 | 1566 | 1137 | 3131 |
| CHE | 237 | 138 | 1660 | 1392 | 3426 |
| GBR | 232 | 178 | 1748 | 1256 | 3414 |
Our second dataset, downloaded from the portal https://data.worldbank.org, gives us information about the GDP of many countries over the course of 60 years (1960-2020).
It is composed of 266 observations of 65 variables :
Country Name Name of the countryCountry Code ISO country codeIndicator Name equal to “GDP in current US$” for every rowIndicator Code equal to “NY.GDP.MKTP.CD” for every rowAs we can see below, RStudio imported the Excel file as is, and so our column names found themselves at the 3rd row and therefore column names of columns 3 to 65 have been attributed numbers.
We decided to fix that and to filter out the years that is in our interest and that we have in common with other tables, so the years 2000-2013. We decided to get rid of the Indicator Name and Indicator Code variables as well since the values are the same for every row and they do not provide additional useful information.
Now, we want to filter out the European countries, just like in the first table :
In order to join tables easily, we transformed the columns corresponding to different years to a single “year” column, in order to have at each row of this dataset the GDP of a certain country at a certain year.
To make it easier to manipulate data, we decided to rename our variables for this table as well. We also made sure that the type of our numeric variable (GDP) was numeric and not character, like it was by default. In order to have graphs that are easy to read in the exploratory data analysis, we also decided to divide the avg_gdp column by a billion.
Lastly, we computed the average GDP for each country over the years 2000-2013 in order to be able to plot different variables together.
| Country Name | Country Code | Average GDP |
|---|---|---|
| Austria | AUT | 335.98 |
| Belgium | BEL | 406.97 |
| Bulgaria | BGR | 37.41 |
| Croatia | HRV | 48.12 |
| Cyprus | CYP | 20.15 |
| Czech Republic | CZE | 158.48 |
| Denmark | DNK | 275.37 |
| Estonia | EST | 16.47 |
| Finland | FIN | 216.58 |
| France | FRA | 2283.48 |
| Germany | DEU | 3003.51 |
| Greece | GRC | 246.19 |
| Hungary | HUN | 110.92 |
| Ireland | IRL | 203.04 |
| Italy | ITA | 1872.80 |
| Latvia | LVA | 21.04 |
| Lithuania | LTU | 30.77 |
| Luxembourg | LUX | 42.85 |
| Malta | MLT | 7.27 |
| Netherlands | NLD | 721.70 |
| Poland | POL | 365.43 |
| Portugal | PRT | 200.37 |
| Romania | ROU | 125.08 |
| Slovak Republic | SVK | 70.82 |
| Slovenia | SVN | 39.50 |
| Spain | ESP | 1176.91 |
| Sweden | SWE | 425.83 |
| Switzerland | CHE | 490.18 |
| United Kingdom | GBR | 2416.76 |
We now have a dataframe with the following variables :
country_name name of the countrycountry_code ISO code of the countryavg_gdp the average GDP of a country over the course of 2000-2013The third dataset, downloaded from https://www.ncdrisc.org/data-downloads-diabetes.html, gives us information about the age-standardised diabetes prevalence for each country and gender from 1980 to 2014.
It is composed of 14’000 observations for 7 variables :
Country/Region/World Name of the countryISO ISO country codeSex Gender for which the diabetes prevalence is measured in a certain country at a certain yearYear Year of observation (1980-2014)Age-standardised diabetes prevalence Diabetes rate considering all agesLower 95% uncertainty interval Lower confidence interval limit for the diabetes rateUpper 95% uncertainty interval Higher confidence interval limit for the diabetes rateLike with the first 2 datasets, we filtered our data to keep only European countries and observations between the years 2000 and 2013.
We also decided not to use the 95% confidence interval variable.
Then, we separated our dataset into two subsets. One with data about men.
Another one with data about women.
We then changed the variable names of these 2 subsets to facilitate joining tables later on.
Finally we grouped observations by country to get the mean prevalence/rate of diabetes between 2000 and 2013 for each European country :
| Country Code | Diabetes rates |
|---|---|
| AUT | 0.053 |
| BEL | 0.057 |
| BGR | 0.073 |
| CHE | 0.050 |
| CYP | 0.077 |
| CZE | 0.078 |
| DEU | 0.059 |
| DNK | 0.055 |
| ESP | 0.084 |
| EST | 0.071 |
| FIN | 0.066 |
| FRA | 0.071 |
| GBR | 0.063 |
| GRC | 0.069 |
| HRV | 0.071 |
| HUN | 0.080 |
| IRL | 0.069 |
| ITA | 0.065 |
| LTU | 0.078 |
| LUX | 0.068 |
| LVA | 0.071 |
| MLT | 0.088 |
| NLD | 0.052 |
| POL | 0.074 |
| PRT | 0.075 |
| ROU | 0.062 |
| SVK | 0.072 |
| SVN | 0.066 |
| SWE | 0.058 |
| Country Code | Diabetes rates |
|---|---|
| AUT | 0.053 |
| BEL | 0.057 |
| BGR | 0.073 |
| CHE | 0.050 |
| CYP | 0.077 |
| CZE | 0.078 |
| DEU | 0.059 |
| DNK | 0.055 |
| ESP | 0.084 |
| EST | 0.071 |
| FIN | 0.066 |
| FRA | 0.071 |
| GBR | 0.063 |
| GRC | 0.069 |
| HRV | 0.071 |
| HUN | 0.080 |
| IRL | 0.069 |
| ITA | 0.065 |
| LTU | 0.078 |
| LUX | 0.068 |
| LVA | 0.071 |
| MLT | 0.088 |
| NLD | 0.052 |
| POL | 0.074 |
| PRT | 0.075 |
| ROU | 0.062 |
| SVK | 0.072 |
| SVN | 0.066 |
| SWE | 0.058 |
We now have 2 dataframes with the following variables :
country_code ISO code of the countryprop_men_diabetes or prop_women_diabetesthe average diabetes rate in a country in the 2000-2013 timeframeFor the last step of our tidying, we joined all four tables in one dataset with the country_code key :
| Country Name | Country Code | GDP | Men Diabetes | Women Diabetes | Calories from animal protein | Calories from plant protein | Calories from carbohydrates | Calories from fat | Total consumption |
|---|---|---|---|---|---|---|---|---|---|
| Austria | AUT | 335.98 | 0.053 | 0.034 | 245 | 169 | 1833 | 1454 | 3702 |
| Belgium | BEL | 406.97 | 0.057 | 0.039 | 238 | 158 | 1856 | 1467 | 3719 |
| Bulgaria | BGR | 37.41 | 0.073 | 0.064 | 155 | 168 | 1606 | 846 | 2775 |
| Croatia | HRV | 48.12 | 0.071 | 0.059 | 168 | 148 | 1691 | 940 | 2946 |
| Cyprus | CYP | 20.15 | 0.077 | 0.056 | 197 | 127 | 1291 | 1019 | 2633 |
| Czech Republic | CZE | 158.48 | 0.078 | 0.065 | 218 | 153 | 1728 | 1155 | 3254 |
| Denmark | DNK | 275.37 | 0.055 | 0.035 | 273 | 157 | 1746 | 1190 | 3366 |
| Estonia | EST | 16.47 | 0.071 | 0.064 | 212 | 167 | 1967 | 842 | 3188 |
| Finland | FIN | 216.58 | 0.066 | 0.044 | 269 | 166 | 1623 | 1177 | 3234 |
| France | FRA | 2283.48 | 0.071 | 0.044 | 293 | 161 | 1611 | 1480 | 3545 |
| Germany | DEU | 3003.51 | 0.059 | 0.040 | 240 | 159 | 1785 | 1276 | 3460 |
| Greece | GRC | 246.19 | 0.069 | 0.060 | 250 | 204 | 1744 | 1338 | 3536 |
| Hungary | HUN | 110.92 | 0.080 | 0.063 | 193 | 153 | 1560 | 1221 | 3126 |
| Ireland | IRL | 203.04 | 0.069 | 0.049 | 279 | 174 | 1950 | 1187 | 3590 |
| Italy | ITA | 1872.80 | 0.065 | 0.047 | 241 | 204 | 1776 | 1390 | 3612 |
| Latvia | LVA | 21.04 | 0.071 | 0.065 | 203 | 154 | 1687 | 1044 | 3087 |
| Lithuania | LTU | 30.77 | 0.078 | 0.069 | 274 | 198 | 2055 | 858 | 3385 |
| Luxembourg | LUX | 42.85 | 0.068 | 0.039 | 288 | 148 | 1752 | 1318 | 3507 |
| Malta | MLT | 7.27 | 0.088 | 0.066 | 237 | 204 | 1932 | 994 | 3367 |
| Netherlands | NLD | 721.70 | 0.052 | 0.037 | 292 | 136 | 1599 | 1195 | 3222 |
| Poland | POL | 365.43 | 0.074 | 0.066 | 204 | 197 | 1969 | 1035 | 3405 |
| Portugal | PRT | 200.37 | 0.075 | 0.052 | 275 | 177 | 1824 | 1240 | 3516 |
| Romania | ROU | 125.08 | 0.062 | 0.059 | 200 | 220 | 2003 | 916 | 3340 |
| Slovak Republic | SVK | 70.82 | 0.072 | 0.059 | 140 | 150 | 1610 | 952 | 2853 |
| Slovenia | SVN | 39.50 | 0.066 | 0.065 | 230 | 168 | 1664 | 1067 | 3129 |
| Spain | ESP | 1176.91 | 0.084 | 0.059 | 279 | 159 | 1481 | 1323 | 3243 |
| Sweden | SWE | 425.83 | 0.058 | 0.040 | 285 | 143 | 1566 | 1137 | 3131 |
| Switzerland | CHE | 490.18 | 0.050 | 0.030 | 237 | 138 | 1660 | 1392 | 3426 |
| United Kingdom | GBR | 2416.76 | 0.063 | 0.049 | 232 | 178 | 1748 | 1256 | 3414 |
We did not have any NA values in our tables, we think this is due to the fact that we really spent time on gathering quality data that matched in terms of dates and countries.
First, even though we will be taking the means of the variables with which we are trying to answer our questions, it is interesting to observe their evolution in each country over time. We started with the GDP.
We can see that the GDP of France, Germany, Italy, Spain and the United Kingdom had a significant increase between 2000 and 2008.
Now let’s see if there is a relation between the GDP of a country and its diabetes prevalence. (men = blue, women = red)
We observe that apart of 5 outliers, our observations are mostly bunched up at the left of the graph. We decided to exclude these 5 observations, to see if we can observe a trend with the other countries. These outliers, as we can see on the graph before, are the countries that had a big increase of GDP in the time period of 2000-2013.
Without the outliers, we can see a bit more clearly. Indeed, it seems that the richer a country is, the lesser it has a high diabetes rate among its population.
For the second table, we tried to see again if there was a trend in the consumption of different macro-nutrients in the 2000s for each country in our sample.
In the different countries, there is one difference that stands out and that seems to be related to wealth. Indeed, countries with a higher GDP like Austria consume on average more fat as can be seen on this graph:
Whereas, countries with a lower GDP have a different pattern with lower fat consumption like Bulgaria below:
There do not seem to be any trends in the graphs above and diets seem rather stable in each country, which is why we will take the average consumption for each macro-nutrient. We can however note that the 5 outliers mentioned before tend to have a higher fat consumption than the countries with a smaller GDP.
We then wanted to analyse the relation between a country’s GDP and its individual consumption of each macronutrient as well as its total calorie consumption to see if there’s a trend.(total calories = orange, fat = blue, carbohydrates = purple, animal protein = red, plant protein = green)
We see that the total calorie consumption does not really change. We wanted a close up on the relation between the total calorie consumption with the GDP for each country to see if we can spot outliers again, so we created other plots.
We end up again with these 5 outliers that have a higher than average GDP so if we remove them, we obtain the following plots :
Now we can more easily state that there’s a trend. It appears that the higher a country’s GDP, the higher the total calories consumed, contrary to our hypothesis.
Once again, we tried to see if the diabetes prevalence in each country changed over the years 2000-2013.
We saw right away that the prevalence of diabetes is higher for man than women across all countries (there are however two exceptions : in Romania between 2000 and 2003 and Slovenia between 2000 and 2006).
We observed three different scenarios for countries that we selected: A decrease over time of diabetes over time for:
We take Belgium as an example :
A decrease over time for women but not for men for :
We take Austria as an example :
In other European countries, the prevalence of diabetes is increasing (at different paces) over time.
We take Croatia as an example :
Finally, we want to plot the relation between the diabetes prevalence against the total calorie consumption as well as each type of macronutrient consumed.
We can see a negative trend for the total consumption, the calories from animal protein and the calories from fat. We can observe a positive trend against calories from plant protein. For protein from carbohydrates, we can see a slighty positive trend for women.
Now, since they affected our plots that included the GDP variable so much, we want to see if we have different trends when we remove our 5 outliers.
Without our 5 outliers, we observe not much change in the trend of each type of calories consumed apart for carbohydrates where the trend changes for men and become slightly positive.
This first question serves more as a control, since we learned during our research prior to our project that countries with higher GDPs tend to have lower diabetes rates. Indeed, we can observe that in the EDA.
But, when we try to fit a linear model on these variables and observe correlations we see that these relationships are not significant at all.
#> [1] -0.369
#> [1] -0.236
#>
#> Call:
#> lm(formula = GDP_diabetes_cal$avg_gdp ~ GDP_diabetes_cal$prop_women_diabetes)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -811.7 -416.8 -201.4 -70.6 2158.9
#>
#> Coefficients:
#> Estimate Std. Error t value
#> (Intercept) 1847 655 2.82
#> GDP_diabetes_cal$prop_women_diabetes -25162 12204 -2.06
#> Pr(>|t|)
#> (Intercept) 0.0089 **
#> GDP_diabetes_cal$prop_women_diabetes 0.0490 *
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 770 on 27 degrees of freedom
#> Multiple R-squared: 0.136, Adjusted R-squared: 0.104
#> F-statistic: 4.25 on 1 and 27 DF, p-value: 0.049
#>
#> Call:
#> lm(formula = GDP_diabetes_cal$avg_gdp ~ GDP_diabetes_cal$prop_men_diabetes)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -539 -418 -310 -138 2286
#>
#> Coefficients:
#> Estimate Std. Error t value
#> (Intercept) 1890 1086 1.74
#> GDP_diabetes_cal$prop_men_diabetes -19988 15812 -1.26
#> Pr(>|t|)
#> (Intercept) 0.093 .
#> GDP_diabetes_cal$prop_men_diabetes 0.217
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 804 on 27 degrees of freedom
#> Multiple R-squared: 0.0559, Adjusted R-squared: 0.0209
#> F-statistic: 1.6 on 1 and 27 DF, p-value: 0.217
However, once we exclude outliers, we see that the relationship is way more significant !
#> [1] -0.696
#> [1] -0.739
#>
#> Call:
#> lm(formula = GDP_diabetes_cal2$avg_gdp ~ GDP_diabetes_cal2$prop_women_diabetes)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -292.3 -63.1 -33.9 59.6 362.3
#>
#> Coefficients:
#> Estimate Std. Error t value
#> (Intercept) 742 124 5.99
#> GDP_diabetes_cal2$prop_women_diabetes -10300 2264 -4.55
#> Pr(>|t|)
#> (Intercept) 5e-06 ***
#> GDP_diabetes_cal2$prop_women_diabetes 0.00016 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 137 on 22 degrees of freedom
#> Multiple R-squared: 0.485, Adjusted R-squared: 0.461
#> F-statistic: 20.7 on 1 and 22 DF, p-value: 0.000158
#>
#> Call:
#> lm(formula = GDP_diabetes_cal2$avg_gdp ~ GDP_diabetes_cal2$prop_men_diabetes)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -186.3 -100.1 -17.5 93.0 298.2
#>
#> Coefficients:
#> Estimate Std. Error t value
#> (Intercept) 1148 188 6.12
#> GDP_diabetes_cal2$prop_men_diabetes -14048 2730 -5.15
#> Pr(>|t|)
#> (Intercept) 3.7e-06 ***
#> GDP_diabetes_cal2$prop_men_diabetes 3.7e-05 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 128 on 22 degrees of freedom
#> Multiple R-squared: 0.546, Adjusted R-squared: 0.526
#> F-statistic: 26.5 on 1 and 22 DF, p-value: 3.7e-05
As mentioned in the first point, countries with a higher GDP consume fewer calories which could be an explanation for the lower diabetes rate. Furthermore, we know from the EDA part that richer countries consume more fat on average but what is the real relationship between calorie consumption and GDP?
Neither the correlation between these two variables nor the linear regression is significant. However, it will be interesting to look further. To do this we can make clusters
#> Warning: Setting row names on a tibble is deprecated.
#> [1] 1 1 1 1 1 1 1 1 1 2 2 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 1 1 2
#> avg_gdp prop_men_diabetes prop_women_diabetes cal_prot_animal
#> 1 336.0 0.0532 0.0340 245
#> 2 407.0 0.0573 0.0386 238
#> 3 37.4 0.0735 0.0640 155
#> 4 48.1 0.0713 0.0589 168
#> 5 20.2 0.0769 0.0561 197
#> 6 158.5 0.0778 0.0651 218
#> cal_prot_plant cal_carbs cal_fat total_consumption cluster
#> 1 169 1833 1454 3702 1
#> 2 158 1856 1467 3719 1
#> 3 168 1606 846 2775 1
#> 4 148 1691 940 2946 1
#> 5 127 1291 1019 2633 1
#> 6 153 1728 1155 3254 1
#> Warning in lda.default(x, grouping, ...): variables are collinear
#> [1] 1 1 3 3 3 1 1 3 1 2 2 1 3 1 2 3 1 1 1 1 1 1 1 3 3 1 1 1 2
top 5, last 5 ?
parler des différents écarts entre macronutriments OU proportions par rapport aux total calories